package validator;

import java.util.HashMap;

public class LoginValidator {
	public HashMap<String, String> validate(String username, String password) {
		HashMap<String, String> map = new HashMap<String, String>();
		if (username.length() > 10) {
			map.put("username", "username too long");
		}
		if (password.length() > 10) {
			map.put("password", "password");
		}
		if(username.length()==0 && password.length()==0)
			map.put("general", "Login failed. Check your username and password!");
		return map;
	}
}
